// pages/list/listView.ts
Page({
  data: {
    types:[
      {  },
      {  },
      {  },
      {  },
      {  },
      {  },
      {  },
    ],
  },
  initLoadmovie(){
    wx.request({
      url:"https://m.douban.com/rexxar/api/v2/subject_collection/movie_weekly_best/items",
      method:"GET",
      data:{
        start:0,
        for_mobile:1,
        ck:"sew4"
      },
      success:(result)=>{
        this.setData({
          "types[0]":result?.data?.subject_collection
        })
      },
      fail:(error)=>{
        console.log(error);
      }
    })
    wx.request({
      url:"https://m.douban.com/rexxar/api/v2/subject_collection/movie_top250/items",
      method:"GET",
      data:{
        start:0,
        for_mobile:1,
        ck:"sew4"
      },
      success:(result)=>{
        this.setData({
          "types[1]":result?.data?.subject_collection
        })
      },
      fail:(error)=>{
        console.log(error);
      }
    })
    wx.request({
      url:"https://m.douban.com/rexxar/api/v2/subject_collection/movie_action/items",
      method:"GET",
      data:{
        start:0,
        for_mobile:1,
        ck:"sew4"
      },
      success:(result)=>{
        this.setData({
          "types[2]":result?.data?.subject_collection
        })
      },
      fail:(error)=>{
        console.log(error);
      }
    })
    wx.request({
      url:"https://m.douban.com/rexxar/api/v2/subject_collection/movie_love/items",
      method:"GET",
      data:{
        start:0,
        for_mobile:1,
        ck:"sew4"
      },
      success:(result)=>{
        this.setData({
          "types[3]":result?.data?.subject_collection
        })
      },
      fail:(error)=>{
        console.log(error);
      }
    })
    wx.request({
      url:"https://m.douban.com/rexxar/api/v2/subject_collection/movie_comedy/items",
      method:"GET",
      data:{
        start:0,
        for_mobile:1,
        ck:"sew4"
      },
      success:(result)=>{
        this.setData({
          "types[4]":result?.data?.subject_collection
        })
      },
      fail:(error)=>{
        console.log(error);
      }
    })
    wx.request({
      url:"https://m.douban.com/rexxar/api/v2/subject_collection/film_genre_46/items",
      method:"GET",
      data:{
        start:0,
        for_mobile:1,
        ck:"sew4"
      },
      success:(result)=>{
        this.setData({
          "types[5]":result?.data?.subject_collection
        })
      },
      fail:(error)=>{
        console.log(error);
      }
    })
    wx.request({
      url:"https://m.douban.com/rexxar/api/v2/subject_collection/film_genre_48/items",
      method:"GET",
      data:{
        start:0,
        for_mobile:1,
        ck:"sew4"
      },
      success:(result)=>{
        this.setData({
          "types[6]":result?.data?.subject_collection
        })
      },
      fail:(error)=>{
        console.log(error);
      }
    })
  },
  onLoad(){
    this.initLoadmovie();
  }
})